swift how to dereference unsafemutablepointer

117

func foobar(_ myPointer: UnsafeMutablePointer<CGRect>) {
    let dereferencedPointer = myPointer.pointee
    print(myPointer.pointee.width, myPointer.pointee.height)
    // Same as print(myCGRect.width, myCGRect.height)
}

Comments

Submit
0 Comments